//package com.travel.controller.message;
//
//import com.travel.common.ServerResponse;
//import com.travel.pojo.message.SingleMessage;
//import com.travel.service.message.SingleMessageServer;
//import org.bson.types.ObjectId;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.List;
//
//@RestController
//public class SingleMessageController {
//
//    @Autowired
//    SingleMessageServer singleMessageServer;
//
//    /**
//     * 单人聊天历史消息查询
//     * @param fromid 发送者的唯一标识
//     * @param toid 对方的唯一标识
//     */
//    @GetMapping("/querySingleMessage/{fromid}/{toid}")
//    public ServerResponse<List<SingleMessage>> querySingleMessage(@PathVariable("fromid")Long fromid, @PathVariable("toid")Long toid){
//        return ServerResponse.createBySuccess(this.singleMessageServer.querySingleMessage(fromid,toid,1,20));
//    }
//
//    /**
//     * 单人聊天消息删除
//     * @param objectId 消息的唯一标识
//     */
//    @GetMapping("/deleteSingleMessage/{objId}")
//    public ServerResponse<String> deleteSingleMessage(@PathVariable("objId")ObjectId objectId){
//       return singleMessageServer.deleteSingleMessage(objectId);
//    }
//}
